package jackson.src.day02;

/*
 * Author: JacksonCoder
 * FileName: overExesices
 * Version: 1.0.0
 */
public class overExesices {
    public static void main(String[] args) {
        Person ming = new Person();
        Person hong = new Person();

        ming.setName("xiaoMing");
        hong.setName("Hong", "xiao");

        System.out.println(ming.getName());
        System.out.println(hong.getName());
    }
}

class Person {

    private String name;

    public String getName() {
        return name;
    }

    //    public String getName(String name){
//        return this.name = name;
//    }
    public void setName(String name) {
        this.name = name;
    }

//    public String getName(String preName, String name){
//        return preName + name;
//    }

    public void setName(String preName, String name) {
        this.name = preName + " " + name;
    }

}
